package cn.signalpha.modules.com.controller.api;

import cn.signalpha.common.constant.AppConstant;
import cn.signalpha.core.boot.ctrl.BaseController;
import cn.signalpha.core.tool.api.R;
import cn.signalpha.modules.com.entity.UserTag;
import cn.signalpha.modules.com.service.UserTagService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

import java.util.List;
import java.util.Map;

/**
 * 控制器
 *
 * @author signalpha
 */
@RestController
@AllArgsConstructor
@RequestMapping(AppConstant.APPLICATION_USER_NAME + "/wap/user/tag")
@Api(value = "用户标签", tags = "用户标签")
public class ApiUserTagController extends BaseController {

	private final UserTagService userTagService;

    @GetMapping("/list")
    @ApiOperation(value = "列表", notes = "")
    public R<List<UserTag>> list(@ApiIgnore @RequestParam Map<String, Object> params) {
        QueryWrapper<UserTag> wrapper = userTagService.selectUserTagWrapper(params);
        return R.data(userTagService.list(wrapper));
    }

}
